<html>
<script>

var isWorkerFinished = false;
var isContentLoaded = false;

function IsWorkerFinished() {
  return isWorkerFinished;
}

function IsContentLoaded() {
  return isContentLoaded;
}

var worker;
function test() {
  worker = new Worker("REPLACE_WITH_UNSAFE_WORKER_PATH");
  worker.onmessage = function(e) {
    isContentLoaded = (e.data == "loaded");
    isWorkerFinished = true;
  };
}

</script>
<body onload="test()"></body>
</html>
